package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.BtyDingdingDayAttend;
import cn.stylefeng.guns.sys.modular.system.entity.BtyDingdingMonthAttend;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyDingdingDayAttendParam;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyDingdingMonthAttendParam;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyDingdingDayAttendResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 钉钉;前三十天，人员出勤数据 Mapper 接口
 * </p>
 *
 * @author wjk
 * @since 2022-05-30
 */
public interface BtyDingdingDayAttendMapper extends BaseMapper<BtyDingdingDayAttend> {

    /**
     * 获取列表
     *
     * @author wjk
     * @Date 2022-05-30
     */
    List<BtyDingdingDayAttendResult> customList(@Param("paramCondition") BtyDingdingDayAttendParam paramCondition);

    /**
     * 获取map列表
     *
     * @author wjk
     * @Date 2022-05-30
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") BtyDingdingDayAttendParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author wjk
     * @Date 2022-05-30
     */
    // Page<BtyDingdingDayAttendResult> customPageList(customPageList@Param("page") Page page, @Param("paramCondition") BtyDingdingDayAttendParam paramCondition);

    List<BtyDingdingDayAttendResult> customPageList(@Param("paramCondition") BtyDingdingDayAttendParam paramCondition);
    /**
     * 获取分页map列表
     *
     * @author wjk
     * @Date 2022-05-30
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") BtyDingdingDayAttendParam paramCondition);

    /**
     * 批量保存
     *
     * @author
     * @Date 2022-05-31
     */
    Integer addList(@Param("list") List<BtyDingdingDayAttend> list);

    /**
     * 删除这个月的数据
     * @param lastMonth
     * @Date 2022-05-31
     * @return
     */
    Integer deleteByYearMonth(@Param("lastMonth") String lastMonth);

    /**
     * 获取月度考勤信息,从日数据表中
     * @param param
     * @return
     */
    List<BtyDingdingMonthAttend> mergeAttendYearMonth(@Param("param") BtyDingdingDayAttendParam param);



    /**
     * 获取缺卡数据
     * @param param
     * @return
     */
    List<BtyDingdingDayAttendResult> getAttendList(@Param("param") BtyDingdingMonthAttendParam param);

    /**
     * 获取迟到数据
     * @param param
     * @return
     */
    List<BtyDingdingDayAttendResult> getLateNumList(@Param("param") BtyDingdingMonthAttendParam param);

    /**
     * 获取外出申请数据
     * @param param
     * @return
     */
    List<BtyDingdingDayAttendResult> getRequestOutList(@Param("param") BtyDingdingMonthAttendParam param);

    /**
     * 获取请假数据
     * @param param
     * @return
     */
    List<BtyDingdingDayAttendResult> getAskLeaveList(@Param("param") BtyDingdingMonthAttendParam param);

    /**
     * 获取修改考勤状态数据
     * @param param
     * @return
     */
    List<BtyDingdingDayAttendResult> getAttendUpdateNoteList(@Param("param") BtyDingdingMonthAttendParam param);
}
